package com.zwh.se.number;

import java.io.IOException;
import java.text.DecimalFormat;


/**
 * @author yexi
 */
public class DecimalFormatDemo {
    public static void main(String[] args) throws IOException {
        DecimalFormat df = new DecimalFormat("0000");
        System.out.println(df.format(1));
        System.out.println(df.format(10000));
        System.out.println(df.format(3.14));
    }
}
